package com.example.dormitory_system.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum ResultCode {
    //操作成功
    SUCCESS (1000, "操作成功"),

    //服务器内部错误，友好提⽰
    ERROR (2000, "服务繁忙请稍后重试"),

    //操作失败，但是服务器不存在异常
    FAILED(3000, "操作失败"),
    FAILED_UNAUTHORIZED(3001, "未授权"),
    FAILED_PARAMS_VALIDATE(3002, "参数校验失败"),
    FAILED_NOT_EXISTS(3003, "资源不存在"),
    FAILED_ALREADY_EXISTS(3004, "资源已存在"),
    AILED_USER_EXISTS(3101, "用户已存在"),
    FAILED_USER_NOT_EXISTS(3102, "用户不存在"),
    FAILED_LOGIN(3103, "用户名或密码错误"),
    FAILED_USER_BANNED(3104, "您已被列入黑名单, 请联系管理员."),
    FAILED_USER_PHONE(3105, "手机号错误"),
    FAILED_FREQUENT_REQUEST(3106, "请求频繁，请稍后再试"),
    FAILED_TIME_LIMIT(3107, "当天请求次数已达到上限"),

    FAILED_SEND_CODE(3108, "验证码发送错误"),

    FAILED_INVALID_CODE(3109, "验证码无效"),

    FAILED_ERROR_CODE(3110, "验证码错误"),
    FAILED_Record_EXISTS(3111, "已存在未处理记录"),
    FAILED_ADMIN_UNTREATED(3112, "管理员暂未处理,请耐心等待");

    /**
     * 状态码
     */
    private int code;
    /**
     * 状态描述
     */
    private String msg;
}
